import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

import Home from "@/views/Home.vue";
import GoodsInfo from "@/views/goods_info.vue";
import NewsList from "@/views/NewsList.vue";
import GoodsDesc from "@/views/GoodsDesc.vue";
import PhotoList from "@/views/PhotoList.vue";
import PhotoInfo from "@/views/PhotoInfo.vue";
import GoodsList from "@/views/goodslist.vue";
import ShopDesc from "@/views/Shop_desc.vue";
import Comment from "@/components/comment.vue";
import Cat from "@/views/Cat.vue";

const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/home" },
    { path: "/home", component: Home },

    { path: "/goods_info/:id", component: GoodsInfo },
    { path: "/newslist", component: NewsList },
    { path: "/goodsdesc/:id", component: GoodsDesc },
    { path: "/photolist", component: PhotoList },
    { path: "/photoinfo/:id", component: PhotoInfo },
    { path: "/goodslist", component: GoodsList },
    { path: "/Shop_desc/:id", component: ShopDesc },
    { path: "/comment/:id", component: Comment },
    { path: "/cat", component: Cat },
  ],
});

export default router;
